package com.pasabahceambalaj.session;

import com.pasabahceambalaj.entity.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;
import java.util.Arrays;

@Name("kalipList")
public class KalipList extends EntityQuery<Kalip> {

	private static final String EJBQL = "select kalip from Kalip kalip";

	private static final String[] RESTRICTIONS = { "lower(kalip.ad) like lower(concat(#{kalipList.kalip.ad},'%'))", "lower(kalip.kod) like lower(concat(#{kalipList.kalip.kod},'%'))", };

	private Kalip kalip = new Kalip();

	public KalipList() {
		setEjbql(EJBQL);
		setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS));
		setMaxResults(25);
	}

	public Kalip getKalip() {
		return kalip;
	}
}
